home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
PASCAL
/
1462.ZIP
/
CHB-1.DOC
< prev
next >
Wrap
Text File
|
1988-11-05
|
8KB
|
174 lines
KEYBOARD RETURN CODES
This appendix lists the keyboard codes for all the key combinations
for the entire keyboard, as they are seen by the procedure READKBD.
All keys are turned into either a one or two character code.
To understand the table below assume St is a two character string.
St[0] is the length of the character code returned. If the length of
St is one then a normal ASCII character was pressed, otherwise an
extended code is generated. Notice that some of the keyboard codes do
produce a two character code with the first character being null.
If the length of St is one then a normal ASCII character code was read
from the keyboard. This basically covers the ASCII values 32-127.
If the length of St is two then one of the keys, that are usually used
for cursor control, was read from the keyboard. If this is the case
then St[1] will be either a 0 or 27 depending on the key combination
read from the keyboard.
Use of the case statement works well with this type of setup to
determine which keyboard keys were read from the keyboard.
Case Ch[1] Of
#00 : Writeln('Control code used.');
#27 : Writeln('Control code used.');
#32..#127 : Writeln('Printable code used.');
End;
Key Key
Pressed CH[0] CH[1] CH[2] Pressed CH[0] CH[1] CH[2]
--------- ----- ----- ----- --------- ----- ----- -----
(space) 1 32 0 & 1 38 0
! 1 33 0 ' 1 39 0
" 1 34 0 ( 1 40 0
# 1 35 0 ) 1 41 0
$ 1 36 0 * 1 42 0
% 1 37 0 + 1 43 0
Key Key
Pressed CH[0] CH[1] CH[2] Pressed CH[0] CH[1] CH[2]
--------- ----- ----- ----- --------- ----- ----- -----
, 1 44 0 S 1 83 0
- 1 45 0 T 1 84 0
. 1 46 0 U 1 85 0
/ 1 47 0 V 1 86 0
0 1 48 0 W 1 87 0
1 1 49 0 X 1 88 0
2 1 50 0 Y 1 89 0
3 1 51 0 Z 1 90 0
4 1 52 0 [ 1 91 0
5 1 53 0 \ 1 92 0
6 1 54 0 ] 1 93 0
7 1 55 0 ^ 1 94 0
8 1 56 0 _ 1 95 0
9 1 57 0 ` 1 96 0
: 1 58 0 a 1 97 0
; 1 59 0 b 1 98 0
< 1 60 0 c 1 99 0
= 1 61 0 d 1 100 0
> 1 62 0 e 1 101 0
? 1 63 0 f 1 102 0
@ 1 64 0 g 1 103 0
A 1 65 0 h 1 104 0
B 1 66 0 i 1 105 0
C 1 67 0 j 1 106 0
D 1 68 0 k 1 107 0
E 1 69 0 l 1 108 0
F 1 70 0 m 1 109 0
G 1 71 0 n 1 110 0
H 1 72 0 o 1 111 0
I 1 73 0 p 1 112 0
J 1 74 0 q 1 113 0
K 1 75 0 r 1 114 0
L 1 76 0 s 1 115 0
M 1 77 0 t 1 116 0
N 1 78 0 u 1 117 0
O 1 79 0 v 1 118 0
P 1 80 0 w 1 119 0
Q 1 81 0 x 1 120 0
R 1 82 0 y 1 121 0
Key Key
Pressed Ch[0] Ch[1] Ch[2] Pressed Ch[0] Ch[1] Ch[2]
--------- ----- ----- ----- --------- ----- ----- -----
z 1 122 0 Alt-B 2 27 48
{ 1 123 0 Alt-N 2 27 49
| 1 124 0 Alt-M 2 27 50
} 1 125 0 F1 2 27 59
~ 1 126 0 F2 2 27 60
Ctrl-Break 2 27 0 F3 2 27 61
Esc 2 27 1 F4 2 27 62
Ctrl-2 2 27 3 F5 2 27 63
BackSp 2 27 8 F6 2 27 64
Tab 2 27 9 F7 2 27 65
Ctrl-Enter 2 27 10 F8 2 27 66
Enter 2 27 13 F9 2 27 67
Ctrl-BS 2 27 14 F10 2 27 68
Shft-Tab 2 27 15 Home 2 27 71
Alt-Q 2 27 16 UArr 2 27 72
Alt-W 2 27 17 PgUp 2 27 73
Alt-E 2 27 18 LArr 2 27 75
Alt-R 2 27 19 RArr 2 27 77
Alt-T 2 27 20 End 2 27 79
Alt-Y 2 27 21 DArr 2 27 80
Alt-U 2 27 22 PgDn 2 27 81
Alt-I 2 27 23 Ins 2 27 82
Alt-O 2 27 24 Del 2 27 83
Alt-P 2 27 25 Shft-F1 2 27 84
Alt-A 2 27 30 Shft-F2 2 27 85
Alt-S 2 27 31 Shft-F3 2 27 86
Alt-D 2 27 32 Shft-F4 2 27 87
Alt-F 2 27 33 Shft-F5 2 27 88
Alt-G 2 27 34 Shft-F6 2 27 89
Alt-H 2 27 35 Shft-F7 2 27 90
Alt-J 2 27 36 Shft-F8 2 27 91
Alt-K 2 27 37 Shft-F9 2 27 92
Alt-L 2 27 38 Shft-F10 2 27 93
Alt-Z 2 27 44 Ctrl-F1 2 27 94
Alt-X 2 27 45 Ctrl-F2 2 27 95
Alt-C 2 27 46 Ctrl-F3 2 27 96
Alt-V 2 27 47 Ctrl-F4 2 27 97
Key Key
Pressed Ch[0] Ch[1] Ch[2] Pressed Ch[0] Ch[1] Ch[2]
--------- ----- ----- ----- --------- ----- ----- -----
Ctrl-F5 2 27 98 Ctrl-F 2 0 6
Ctrl-F6 2 27 99 Ctrl-G 2 0 7
Ctrl-F7 2 27 100 Ctrl-H 2 0 8
Ctrl-F8 2 27 101 Ctrl-I 2 0 9
Ctrl-F9 2 27 102 Ctrl-J 2 0 10
Ctrl-F10 2 27 103 Ctrl-K 2 0 11
Alt-F1 2 27 104 Ctrl-L 2 0 12
Alt-F2 2 27 105 Ctrl-M 2 0 13
Alt-F3 2 27 106 Ctrl-N 2 0 14
Alt-F4 2 27 107 Ctrl-O 2 0 15
Alt-F5 2 27 108 Ctrl-P 2 0 16
Alt-F6 2 27 109 Ctrl-Q 2 0 17
Alt-F7 2 27 110 Ctrl-R 2 0 18
Alt-F8 2 27 111 Ctrl-S 2 0 19
Alt-F9 2 27 112 Ctrl-T 2 0 20
Alt-F10 2 27 113 Ctrl-U 2 0 21
Ctrl-LArr 2 27 115 Ctrl-V 2 0 22
Ctrl-RArr 2 27 116 Ctrl-W 2 0 23
Ctrl-End 2 27 117 Ctrl-X 2 0 24
Ctrl-PgDn 2 27 118 Ctrl-Y 2 0 25
Ctrl-Home 2 27 119 Ctrl-Z 2 0 26
Alt-1 2 27 120 Ctrl-[ 2 0 27
Alt-2 2 27 121 Ctrl-\ 2 0 28
Alt-3 2 27 122 Ctrl-] 2 0 29
Alt-4 2 27 123 Ctrl-6 2 0 30
Alt-5 2 27 124 Ctrl-- 2 0 31
Alt-6 2 27 125
Alt-7 2 27 126
Alt-8 2 27 127
Alt-9 2 27 128
Alt-0 2 27 129
Alt-- 2 27 130
Alt-= 2 27 131
Ctrl-PgUp 2 27 132
Ctrl-A 2 0 1
Ctrl-B 2 0 2
Ctrl-C 2 0 3
Ctrl-D 2 0 4
Ctrl-E 2 0 5